PrintMode definition for a print job

generate wiki register documentation


In [1]:
nbr = 32

PrintMode =  ([8,  'SRC_NOTHING', '-'],)
PrintMode += ([9,  'SRC_PATTERN', 'Fix pattern'],)
PrintMode += ([10, 'SRC_GIGABIT', 'Data taken from Ethernet Gigabit interface'],)
PrintMode += ([11, 'SRC_FOE',     'Data taken from File over EtherCAT interface'],)
PrintMode += ([13, 'ENDLESS',     'wrap mode is enabled in the JetMapping part'],)
PrintMode += ([16, 'INFINITE',    '-'],)
PrintMode += ([17, 'PREPOSTBLANK',' Added PrePost Blank on the image'],)
PrintMode += ([18, 'SEGMENTED',   '-'],)
PrintMode += ([19, 'VARDATA',   '-'],)
PrintMode += ([22, 'BPP_0',       '-'],)
PrintMode += ([23, 'BPP_1',       '-'],)
PrintMode += ([31, 'TEST',        '-'],)


print("| bit ^                           Binary ^ Hex      ^   Decimal  ^    ^ Register name   ^ Comment ^")
print("|-----|----------------------------------|----------|------------|----|-----------------|--------------------------------|")
for i in range(nbr):
  desc = [0, '', '']
  for k in PrintMode:
    if k[0] == i:
      desc = k
  print("|{0:4} | {1:032b} | {1:08X} | {1:10d} | {0:2} | {2:15} | {3:30} |".format(i,1<<i,desc[1],desc[2]))


| bit ^                           Binary ^ Hex      ^   Decimal  ^    ^ Register name   ^ Comment ^
|-----|----------------------------------|----------|------------|----|-----------------|--------------------------------|
|   0 | 00000000000000000000000000000001 | 00000001 |          1 |  0 |                 |                                |
|   1 | 00000000000000000000000000000010 | 00000002 |          2 |  1 |                 |                                |
|   2 | 00000000000000000000000000000100 | 00000004 |          4 |  2 |                 |                                |
|   3 | 00000000000000000000000000001000 | 00000008 |          8 |  3 |                 |                                |
|   4 | 00000000000000000000000000010000 | 00000010 |         16 |  4 |                 |                                |
|   5 | 00000000000000000000000000100000 | 00000020 |         32 |  5 |                 |                                |
|   6 | 00000000000000000000000001000000 | 00000040 |         64 |  6 |                 |                                |
|   7 | 00000000000000000000000010000000 | 00000080 |        128 |  7 |                 |                                |
|   8 | 00000000000000000000000100000000 | 00000100 |        256 |  8 | SRC_NOTHING     | -                              |
|   9 | 00000000000000000000001000000000 | 00000200 |        512 |  9 | SRC_PATTERN     | Fix pattern                    |
|  10 | 00000000000000000000010000000000 | 00000400 |       1024 | 10 | SRC_GIGABIT     | Data taken from Ethernet Gigabit interface |
|  11 | 00000000000000000000100000000000 | 00000800 |       2048 | 11 | SRC_FOE         | Data taken from File over EtherCAT interface |
|  12 | 00000000000000000001000000000000 | 00001000 |       4096 | 12 |                 |                                |
|  13 | 00000000000000000010000000000000 | 00002000 |       8192 | 13 | ENDLESS         | wrap mode is enabled in the JetMapping part |
|  14 | 00000000000000000100000000000000 | 00004000 |      16384 | 14 |                 |                                |
|  15 | 00000000000000001000000000000000 | 00008000 |      32768 | 15 |                 |                                |
|  16 | 00000000000000010000000000000000 | 00010000 |      65536 | 16 | INFINITE        | -                              |
|  17 | 00000000000000100000000000000000 | 00020000 |     131072 | 17 | PREPOSTBLANK    |  Added PrePost Blank on the image |
|  18 | 00000000000001000000000000000000 | 00040000 |     262144 | 18 | SEGMENTED       | -                              |
|  19 | 00000000000010000000000000000000 | 00080000 |     524288 | 19 | VARDATA         | -                              |
|  20 | 00000000000100000000000000000000 | 00100000 |    1048576 | 20 |                 |                                |
|  21 | 00000000001000000000000000000000 | 00200000 |    2097152 | 21 |                 |                                |
|  22 | 00000000010000000000000000000000 | 00400000 |    4194304 | 22 | BPP_0           | -                              |
|  23 | 00000000100000000000000000000000 | 00800000 |    8388608 | 23 | BPP_1           | -                              |
|  24 | 00000001000000000000000000000000 | 01000000 |   16777216 | 24 |                 |                                |
|  25 | 00000010000000000000000000000000 | 02000000 |   33554432 | 25 |                 |                                |
|  26 | 00000100000000000000000000000000 | 04000000 |   67108864 | 26 |                 |                                |
|  27 | 00001000000000000000000000000000 | 08000000 |  134217728 | 27 |                 |                                |
|  28 | 00010000000000000000000000000000 | 10000000 |  268435456 | 28 |                 |                                |
|  29 | 00100000000000000000000000000000 | 20000000 |  536870912 | 29 |                 |                                |
|  30 | 01000000000000000000000000000000 | 40000000 | 1073741824 | 30 |                 |                                |
|  31 | 10000000000000000000000000000000 | 80000000 | 2147483648 | 31 | TEST            | -                              |

convert register

see Jupyter Notebook -> CoE_Register_extract